home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d13
/
nm091.arc
/
NM.DOC
< prev
next >
Wrap
Text File
|
1991-05-29
|
14KB
|
350 lines
Now Menu 0.90
by Bradford B. Taliaferro
SempriniWare
SoftWare that doesn't listen to wicky-wicky tunes
INTRODUCTION: Now Menu is the menu system that lets you add menuing to any
player/viewer program. The program is generalized and will
work with ANY DOS command. Thus you may use it to menu any
sound player, menu any picture viewer or any other program.
DESCRIPTION: Now Menu creates a batch file with a menu chosen file for
some user defined operation. Using NM, a simple menu system
can be created in seconds for any DOS program. No more searching
through directory listings to find the one file you wish to use.
USAGE: NM /Bbatfile /Ffilespec /Ccommand [/1parm1.../1parmx]
[/2parm1.../2parmx] [/Ttitle] [/@configfile]
[/A1color]...[/A6color]
Specify each option you wish (/C is necessary) in any order.
Do not put a space between the switch and the accompanying
specification (i.e. /BTEMP.BAT not /B TEMP.BAT).
/Bbatfile is the batch file name to be created.
/Ffilespec is the path/file specification for the program to
use when it runs. For example, if you are menuing a
VOC player use *.VOC or C:\SB\VOXKIT\*.VOC.
/Ccommand is the program to be run. Sticking with our VOC
example we could put VPLAY here, or C:\SB\VOXKIT\VPLAY.
/1parm1.../1parmx or /2parm1.../2parmx are the optional
parameters for the program. With our example we might use
/Q. Note that /1 parameters are included BEFORE the file
specification and /2 parameters are included AFTER the file
specification. (See example below for more details.)
/Ttitle is a menu title to display at the top of the screen when
making menu selections. Instead of spaces in your title use the
underbar "_" character. It will be replaced by spaces when the
program prints your title.
/@configfile is a file name of a configuration file containing
any of the command line parameters excluding the /@. Using /@
by itself with no config file name will disable the reading of
the config file. If you do not include a file extension an
extension of .NM will be added. For a file with no extension
use the filename with a dot after it i.e., /@CONFIG.
/A1color.../A6color set the color attributes for different parts
of the menu. The format is /AXyy where X is one of the
following numbers:
1 - The foreground color of the menu choices
2 - The background color of the menu choices
3 - The foreground color of the highlight bar
4 - The background color of the highlight bar
5 - The foreground color of the menu title
6 - The background color of the menu title
and yy is one of the following colors numbers:
0 - black --------
1 - blue \
2 - green \
3 - cyan \ Background colors can
4 - red / only be 0 thru 7
5 - magenta /
6 - brown /
7 - light gray --------
8 - dark gray
9 - light blue
10 - light green (Add 128 to make colors blink)
11 - light cyan
12 - light red
13 - light magenta
14 - yellow
15 - white
Thus, to make the title appear in yellow on blue, specify the
following parameters on the command line or in the CONFIG file.
/A514 /A61
The colors default to black and white so monochrome displays
will not be left out.
(Note that NM /VER will display the name and version number of
the program. This is a SempriniWare standard feature. Also
standard is help display with the
parameters /, ?, /?, /h, or /H).
KEYS: Keys active while the menu is being display are as follows:
A - Sort list in ascending alphanumeric order.
D - Sort list in descending alphanumeric order.
PgUp - Display next page of names (when more than 120 files are
available.
PgDn - Display previous page of name (when more than 120 files
are available.
ESC - (escape key) Aborts the program. No batch file is
created.
RETURN - (return or enter key) Exits the program, selecting the
highlited file. A batch file is created using the
specified command and the selected file.
CURSOR or ARROW keys - move the highlite bar around to select
the file name to be used.
HOME - Go to beginning of screen
END - Go to end of screen
NOTES: Any and all parameters (except the /@) may be put into a config
file. A suggested use is to put a CONFIG.NM into each directory
where NM will be used. Thus you may have a specialized config
file for each application. The structure of the config file is
the same as the command line parameters, with one parameter on
each line of the file:
/Cdir
/F*.*
/TSilly_directory_menu
/B$$$TEMP.BAT
The config file default name is CONFIG.NM. If no parameters are
specified the program will look for CONFIG.NM in the current
directory. If it is not found, the program will terminate.
When the program processes command line parameters, it first
looks for a config file. If one is specified it will look for
that one, otherwise it will look for CONFIG.NM. Once it reads
in from any config file it finds, the program then processes
the command line parameters. Thus, any parameters specified
on the command line will overwrite those in the config file.
For example:
NM /F*.PAS /CTYPE /TLook_at_Pascal_progs
is our command line. Our config file contains the line:
/TThese_are_Pascal_progs
The title that will be displayed is:
Look at Pascal progs
EXAMPLE: For this example lets use the VPLAY command for Sound Blaster
voice files. We have a pile of VOC files and no menu, right?
Well, here is a very simple solution:
Assume the following:
1. Our VPLAY program is in C:\SB\VOX
2. Our .VOC files are in C:\SB\VOICE
3. Our NM program is in C:\UTILS
4. We want a parameter before and after the file spec.
A useful implementation of NM would be in the following batch
file:
@ECHO OFF
:TOP
C:\UTILS\NM /B$$TEMP$$ /FC:\SB\VOICE\*.VOC /CC:\SB\VOX\VPLAY /1/Q /2/T9
IF EXISTS $$TEMP$$.BAT GOTO RUN
GOTO EXIT
:RUN
CALL $$TEMP$$
ERASE $$TEMP$$.BAT
CLS
GOTO TOP
:EXIT
CLS
This would run the program, call the created batch file, then
erase it from the disk, then return to the menu for another
selection. Pressing ESC from the menu program will cause the
batch file to be erased and exits the menu. When the batch
file sees the $$TEMP$$.BAT doesn't exist - it ends. Thus we
have a simple menu program! The advantage of this program is
that works in batch mode instead of calling the program itself.
This allows the program to be used in conjunction with real
memory hogs. It also allows the creation of batch files that
call many different systems, each with a simple menu!
Lets say we picked a file called SHOUT.VOC from the menu. Our
sample batch file, $$TEMP$$.BAT would look like this:
C:\SB\VOX\VPLAY /T9 C:\SB\VOICE\SHOUT.VOC /Q
Normally, we wouldn't want the /T9 parameter before the file
name, but we did it here for an example only.
We could also make the .VOC menu with a config file. The
following config file should be in the directory with the
*.VOC files (named CONFIG.NM):
/B$$TEMP$$
/FC:\SB\VOICE\*.VOC
/CC:\SB\VOX\VPLAY
/1/Q
/2/T9
Then our batch file would look like this (call it M.BAT):
@ECHO OFF
:TOP
C:\UTILS\NM
IF EXISTS $$TEMP$$.BAT GOTO RUN
GOTO EXIT
:RUN
CALL $$TEMP$$
ERASE $$TEMP$$.BAT
CLS
GOTO TOP
:EXIT
CLS
We could also create a CONFIG.NM in our \SB\TRAKBLAS directory
which contains the .MOD files for Trak Blaster. That config
file would look like this:
/B$$TEMP$$
/FC:\SB\TRAKBLAS\*.MOD
/CC:\SB\TRAKBLAS\VPLAY
/TTrak_Blaster_Songs
With M.BAT residing in a directory in the DOS path, it is a
simple task to create CONFIG.NM files for any application that
requires menuing.
see EXAMPLE.BAT for another, working example of the programs
unlimited usage.
REGISTRATION: Registration is requested at $15.00 US funds. Registered users
will recieve one free update along with a disk of my other
shareware programs. Registered users are also entitled to help
via the Micron Firefly BBS including the setup of special batch
files for your applications. See below for our phone number.
UPDATES:
0.90 - initial release. No bugs, of course (hee hee hee). I am
taking advantage of Mike Durkin's fine CRC check program and his
generous Shareware allowances. If I make any - you'll get yours
Mike!
0.91 - Added colors, config file, more intuitive key activity,
and fixed a bug in the screen after moving from one page to
another. Special thanks to John Trindle for testing and
suggestions for improvements.
REGISTRATION FORM - NM 0.90 - FEE [$15]
NAME ___________________________ PHONE (Optional)__________________
ADDRESS_________________________ CITY, STATE_______________________
ZIP_____________________________ OCCUPATION________________________
COMPUTER USE (programs, games, etc, i.e. 'what do you do?')____________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
COMMENTS_______________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
Contributions are encouraged and suggestions are invited. Send all
correspondence to:
Bradford B. Taliaferro
609 North 3rd Street
Savannah, MO 64485
Also, call the Micron Firefly BBS - Home of SempriniWare. We are moving to our
new phone location on June 5th. Call us at 816-324-3148 after June 5th or at
717-724-4280 until June 3rd.